﻿#ifndef SALESMAN_H
#define SALESMAN_H

#include "../../Include/iservice.h"

class CSalesman : public IService
{
    Q_OBJECT
public:
    static CSalesman* GetInstance() { static CSalesman __instance; return &__instance; }
public:
    CSalesman();
    virtual ~CSalesman();
    virtual int Init();
    virtual int UnInit();
    virtual int SetFramework(IFramework* pFrm);
    virtual int PostThreadMsg(int nType, QString data);

private:
    QThread     m_thread;
    IFramework  *m_pFramework;
    ILogger     *m_pLogger;
    IConfig     *m_pConfig;
    INetComm    *m_pNetComm;
    ICommon     *m_pCommon;
    IService    *m_pSaleswoman;
    //
    QTimer      *m_timer001;
signals:
    void sigPostTrdMsg(int nType, QString msg);
private slots:
    void slotGetTrdMsg(int nType, QString msg);
    void slotTimer001();
};

#endif // SALESMAN_H
